import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import xinxiliuLayout from '@/layouts/xinxiliu/xinxiliuLayout'
// import PageView from '@/layouts/PageView'

//新配置
const options = {
  routes:[
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: process.env.VUE_APP_HOME_PATH,
      children: [
        {
          path: 'device',
          name: '管理',
          meta: {
            icon: 'appstore-o',
            authority: {
              role: '/device/account'
            }
          },
          component: BlankView,
          children: [
            {
              path: 'account',
              name: '账户管理',
              meta: {
                authority: {
                  role: '/device/account'
                }
              },
              component: () => import('@/pages/admin/device/account'),
            },
            {
              path: 'product',
              name: '商品管理',
              meta: {
                authority: {
                  role: '/device/product'
                }
              },
              component: () => import('@/pages/admin/product/product'),
            },
            // {
            //   path: 'material',
            //   name: '素材管理',
            //   meta: {
            //     authority: {
            //       role: '/device/material'
            //     }
            //   },
            //   component: () => import('@/pages/admin/material/material'),
            // },
            {
              path: 'manager',
              name: '管理员管理',
              meta: {
                authority: {
                  role: '/device/manager'
                }
              },
              component: () => import('@/pages/admin/manager/manager'),
            },
            {
              path: 'permission',
              name: '权限管理',
              meta: {
                authority: {
                  role: '/device/permission/list'
                }
              },
              component: BlankView,
              children: [
                {
                  path: 'list',
                  name: '权限列表',
                  meta: {
                    authority: {
                      role: '/device/permission/list'
                    }
                  },
                  component: () => import('@/pages/admin/permission/list'),
                },
                {
                  path: 'group',
                  name: '权限组',
                  meta: {
                    authority: {
                      role: '/device/permission/group'
                    }
                  },
                  component: () => import('@/pages/admin/permission/group'),
                },
              ]
            }
          ]
        },
        {
          path: 'shuju',
          name: '数据',
          meta: {
            icon: 'bar-chart',
            authority: {
              role: '/shuju/zhanghu'
            }
          },
          component: BlankView,
          children: [
            {
              path: 'zhanghu',
              name: '账户报表',
              meta: {
                authority: {
                  role: '/shuju/zhanghu'
                }
              },
              component: () => import('@/pages/admin/zhanghu/zhanghu.vue'),
            },
            // {
            //   path: 'zhanlue',
            //   name: '战略中心',
            //   component: BlankView,
            //   meta: {
            //     authority: {
            //       role: '/shuju/zhanlue'
            //     }
            //   },
            //   children: [
            //     {
            //       path: 'list',
            //       name: '战略数据',
            //       meta: {
            //         authority: {
            //           role: '/shuju/zhanlue'
            //         }
            //       },
            //       component: () => import('@/pages/admin/zhanlue/zhanlue.vue'),
            //     },
            //     {
            //       path: 'pf',
            //       name: '赔付数据',
            //       meta: {
            //         authority: {
            //           role: '/shuju/zhanlue'
            //         }
            //       },
            //       component: () => import('@/pages/admin/zhanlue/pf/pf.vue'),
            //     },
            //     {
            //       path: 'zhutui',
            //       name: '主推数据',
            //       meta: {
            //         authority: {
            //           role: '/shuju/zhanlue'
            //         }
            //       },
            //       component: () => import('@/pages/admin/zhanlue/zhutui/zhutui.vue'),
            //     },
            //     {
            //       path: 'fupan',
            //       name: '复盘数据',
            //       meta: {
            //         authority: {
            //           role: '/shuju/zhanlue'
            //         }
            //       },
            //       component: () => import('@/pages/admin/zhanlue/fupan/fupan.vue'),
            //     },
            //   ]
            // },
            {
              path: 'zhanghuDate',
              name: '账户日报',
              meta: {
                authority: {
                  role: '/shuju/zhanghuDate'
                }
              },
              component: () => import('@/pages/admin/zhanghuDate/zhanghuDate.vue'),
            },
            {
              path: 'optimizer',
              name: '优化师数据',
              meta: {
                authority: {
                  role: '/shuju/optimizer'
                }
              },
              component: () => import('@/pages/admin/shuju/optimizer.vue'),
            },
            {
              path: 'zhanghuHours',
              name: '账户小时报表',
              meta: {
                authority: {
                  role: '/shuju/zhanghu'
                }
              },
              component: () => import('@/pages/admin/shuju/zhanghuHours.vue'),
            },
            {
              path: 'shujuList',
              name: '计划日报表',
              meta: {
                authority: {
                  role: '/shuju/shujuList'
                }
              },
              component: () => import('@/pages/admin/shujuList/shujuList.vue'),
            },
            {
              path: 'productChart',
              name: '商品报表',
              meta: {
                authority: {
                  role: '/shuju/shujuList'
                }
              },
              component: () => import('@/pages/admin/productChart/productChart.vue'),
            },
            {
              path: 'aitask',
              name: '自动驾驶',
              meta: {
                authority: {
                  role: '/shuju/autoChangeList'
                }
              },
              component: BlankView,
              children: [
                {
                  path: 'taskList',
                  name: '任务列表',
                  meta: {
                    authority: {
                      role: '/shuju/autoChangeList'
                    }
                  },
                  component: () => import('@/pages/admin/aitask/taskList.vue'),
                },
                {
                  path: 'taskLog',
                  name: '任务日志',
                  meta: {
                    authority: {
                      role: '/shuju/autoChangeList'
                    }
                  },
                  component: () => import('@/pages/admin/aitask/taskLog.vue'),
                },
              ]
            },
            // {
            //   path: 'zhiboList',
            //   name: '直播报表',
            //   meta: {
            //     authority:{
            //       role:'/shuju/zhiboList'
            //     }
            //   },
            //   component: () => import('@/pages/admin/shuju/zhiboListTabs.vue'),
            // },
            
            // {
            //   path: 'qiliang',
            //   name: '当日起量计划',
            //   meta: {
            //     authority:{
            //       role:'/shuju/qiliang'
            //     }
            //   },
            //   component: () => import('@/pages/admin/qiliang/qiliang.vue'),
            // },
            // {
            //   path: 'chengben',
            //   name: '成本上升计划',
            //   meta: {
            //     authority:{
            //       role:'/shuju/chengben'
            //     }
            //   },
            //   component: () => import('@/pages/admin/chengben/chengben.vue'),
            // },
            // {
            //   path: 'silence',
            //   name: '沉默计划',
            //   meta: {
            //     authority:{
            //       role:'/shuju/silence'
            //     }
            //   },
            //   component: () => import('@/pages/admin/silence/silence.vue'),
            // },
            // {
            //   path: 'shuaitui',
            //   name: '衰退计划',
            //   meta: {
            //     authority:{
            //       role:'/shuju/shuaitui'
            //     }
            //   },
            //   component: () => import('@/pages/admin/shuaitui/shuaitui.vue'),
            // },
          ]
        },
        // {
        //   path: 'tuiguang',
        //   name: '推广',
        //   meta: {
        //     icon: 'bar-chart',
        //     authority: {
        //       role: '/tuiguang/zhanghu'
        //     }
        //   },
        //   component: BlankView,
        //   children: [
        //     {
        //       path: 'zhanghu',
        //       name: '账户报表',
        //       meta: {
        //         authority: {
        //           role: '/tuiguang/zhanghu'
        //         }
        //       },
        //       component: () => import('@/pages/admin/tuiguang/zhanghu.vue'),
        //     },
        //     {
        //       path: 'shujuList',
        //       name: '计划日报表',
        //       meta: {
        //         authority: {
        //           role: '/tuiguang/zhanghu'
        //         }
        //       },
        //       component: () => import('@/pages/admin/tuiguang/shujuList/shujuList.vue'),
        //     },
        //   ],
        // },
        {
          path: '/shumei',
          name: '数媒',
          component: BlankView,
          meta: {
            icon: 'youtube',
            authority:{
              role:'/shumei/add'
            }
          },
          children: [
            {
              path: 'add',
              name: '数据列表',
              meta: {
                authority:{
                  role:'/shumei/add'
                }
              },
              component: ()=>import('@/pages/admin/shumei/add')
            },
            {
              path: 'list',
              name: '综合报表',
              meta: {
                authority:{
                  role:'/shumei/list'
                }
              },
              component: ()=>import('@/pages/admin/shumei/list')
            },
            {
              path: 'designer',
              name: '设计师报表',
              meta: {
                authority:{
                  role:'/shumei/designer'
                }
              },
              component: ()=>import('@/pages/admin/shumei/designer')
            },
          ]
        },
      ]
    },
    {
      path: '/xinxiliu',
      name: '信息流',
      component: xinxiliuLayout,
      children: [
        {
          path: 'batch',
          name: '一键添加',
          component: () => import('@/pages/admin/batch/batch')
        },
        {
          path: 'batchZhibo',
          name: '一键添加直播',
          component: () => import('@/pages/admin/batch/batchZhibo')
        },
        {
          path: 'batchPro',
          name: '批量添加',
          component: () => import('@/pages/admin/batchPro/batch')
        }, {
          path: 'batchZhiboPro',
          name: '批量添加直播',
          component: () => import('@/pages/admin/batchPro/batchZhibo')
        },
        // {
        //   path: '/',
        //   name: '信息流推广首页',
        //   component: ()=>import('@/pages/admin/xinxiliu/xinxiliuView')
        // },
        // {
        //   path:'add',
        //   name: '添加信息流推广',
        //   component: xinxiliuLayout,
        //   children: [
        //     {
        //       path:'step1',
        //       name:'步骤一',
        //       component: ()=>import('@/pages/admin/xinxiliu/add/addStep1')
        //     },
        //     {
        //       path:'step2',
        //       name:'步骤二',
        //       component: ()=>import('@/pages/admin/xinxiliu/add/addStep2')
        //     }
        //   ]
        // },
        // {
        //   path:'batchCreativity',
        //   name:'批量添加',
        //   component: ()=>import('@/pages/admin/xinxiliu/batchCreativity')
        // },
        // {
        //   path:'bulkAdd',
        //   name:'批量添加',
        //   component: ()=>import('@/pages/admin/xinxiliu/bulkAdd')
        // },
        // {
        //   path:'chengxuhuaAdd',
        //   name:'程序化批量添加',
        //   component: ()=>import('@/pages/admin/xinxiliu/chengxuhuaAdd')
        // },
        {
          path:'chouzhen',
          name:'视频抽帧',
          component: ()=>import('@/pages/admin/xinxiliu/chouzhen')
        },
      ]
    },
    {
      path: '/etrade',
      name: '电商',
      component: xinxiliuLayout,
      children:[
        {
          path: '/',
          name: '电商推广首页',
          component: ()=>import('@/pages/admin/etrade/etrade')
        },
      ]
    },
    {
      path: '/shumeiData',
      name: 'shumeiAnalysis',
      component: () => import('@/pages/admin/shumei/analysis'),
    },
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login'), 
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
  ],
  // mode:'history'
  mode:'hash'
}


export default options
